#!/bin/sh
################################################################################\
exec wish "$0" "$@"

set package_dir [file join [file dirname $argv0] "../.."]

wm title . "HelpSystem's DEMO"

lappend auto_path $package_dir
package require help 1.4

set helpfile "help/demo.help"

frame .fl
pack .fl -side left -fill y -expand 0

frame .fr -width 100 -height 100
pack .fr -side left -fill both -expand 1

text .fl.t -width 20 -height 5 -wrap word
.fl.t insert 1.0 "Put focus to this text widget and press <F1> to get a context dependent help."
pack .fl.t -side top -fill both -expand 1

button .fl.b -text "Open a separate help window" \
             -command "help::destroy; help::init $helpfile out" 
pack .fl.b -side top -fill x

help::init $helpfile in .fr 280 250
help::reg  .fl.t $helpfile text .fr <F1> 280 250
